#-*-coding:utf-8-*-
import hou
class ShelfToolsAndTabMenu(object):
    def __init__(self):
        super(ShelfToolsAndTabMenu,self).__init__()


    def setToolHistoryLength(self,value):
        hou.setPreference('tools.maxhistory.val',str(value))
        # print('setToolHistoryLength')

    def getToolHistoryLength(self):
        return hou.setPreference('tools.maxhistory.val')
        # print('getToolHistoryLength')

    def setTabMenuOperatorNamespaceFiltering(self,filterNum):
        '''

        :param filterNum: 0 - Show All Operators,
        1 - Show Only Operators with Preferred Versions
        2 - Show Single Operator from the Preferred Namespace
        :return:
        '''
        hou.setPreference('tools.opnamespacefilter.val', str(filterNum))
        # print('setTabMenuOperatorNamespaceFiltering')

    def getTabMenuOperatorNamespaceFiltering(self):
        return hou.getPreference('tools.opnamespacefilter.val')
        # print('getTabMenuOperatorNamespaceFiltering')


